import request from '@/utils/request'

/**
 * 获取修改权限点详情
 */
export const updatePermissionAPI = (data) => {
  return request.put(`/sys/permission/${data.id}`, data)
}

/**
 * 获取权限点详情
 */
export const getPermissionsDetailAPI = (id) => {
  return request.get(`/sys/permission/${id}`)
}
/**
 * 获取添加权限接口方法
 */
export const addPermissionAPI = (data) => {
  return request.post('/sys/permission', data)
}
/**
 * 获取删除权限点接口方法
 */
export const deletePermissionAPI = (id) => {
  return request.delete(`/sys/permission/${id}`)
}
/**
 * 获取权限点列表接口方法
 */
export const getPermissionsListAPI = () => {
  return request.get('/sys/permission')
}
